from bookmarks.views import user_page, main_page, logout_page, dictionary_page, \
    search_page, trend_page, tf_page, category_page, ner_page, d3cooccur_page, \
    d3force_page, json_page, visualviser_page, json_line, d3cloud_page,\
    keyword_page
from django.conf.urls import patterns, include, url
from django.contrib import admin
import os.path

site_media = os.path.join(
    os.path.dirname(__file__), 'site_media'
)

# Uncomment the next two lines to enable the admin:
admin.autodiscover()

urlpatterns = patterns('',
    (r'^$', main_page),
    (r'^user/(\w+)/$', user_page),
    (r'^login/$', 'django.contrib.auth.views.login'),
    (r'^logout/$', logout_page),
    (r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root' : site_media}),
    (r'^dictionary$', dictionary_page),
    (r'^search$', search_page),
    (r'^trend$', trend_page),
    (r'^tf$', tf_page),
    (r'^category$', category_page),
    (r'^ner$', ner_page),
    (r'^d3$', d3force_page),
    (r'^d3co$', d3cooccur_page),
    (r'^json/(?P<path>.*)$', json_page),
    (r'^visualviser*', visualviser_page),
    (r'^^json_line/(?P<grpParam>[\d,]+)$', json_line),
    (r'^d3cloud$', d3cloud_page),
    (r'^keyword$', keyword_page),
    # Examples:
    # url(r'^$', 'Sample1.views.home', name='home'),
    # url(r'^Sample1/', include('Sample1.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
#     url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
     url(r'^admin/', include(admin.site.urls)),
)
